﻿<UserControl x:Class="Photos.Controls.PhotoControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="300" d:DesignWidth="300" RenderTransformOrigin="0.5,0.5"
             MouseLeftButtonDown="UserControlMouseLeftButtonDown">
    <UserControl.RenderTransform>
        <RotateTransform x:Name="Rotation" Angle="0"/>
    </UserControl.RenderTransform>
    <Grid>
        <Rectangle Fill="Black" Margin="7" Opacity="0.1">
            <Rectangle.Effect>
                <BlurEffect />
            </Rectangle.Effect>
        </Rectangle>
        <Border BorderBrush="White" BorderThickness="1" Margin="10">
            <Border.CacheMode>
                <BitmapCache RenderAtScale="1"/>
            </Border.CacheMode>
            <Border.Background>
                <LinearGradientBrush>
                    <GradientStop Color="#dedede" Offset="0"/>
                    <GradientStop Color="#f8f8f8" Offset="0.3"/>
                    <GradientStop Color="#f8f8f8" Offset="0.7"/>
                    <GradientStop Color="#dedede" Offset="1"/>
                </LinearGradientBrush>
            </Border.Background>
            <Border Margin="5" BorderThickness="1" BorderBrush="#9f9f9f" Background="White">
                <Image Name="Image"  Stretch="UniformToFill">
                    <Image.Source>
                        <BitmapImage x:Name="BitmapImage" UriSource="/Photos;component/Resources/preview_portrait.png" DecodePixelWidth="300" RenderOptions.BitmapScalingMode="LowQuality"/>
                    </Image.Source>
                </Image>
            </Border>
        </Border>
    </Grid>
</UserControl>
